<template>
    <div class="nine-wrapper">
        <router-link tag="div" :to="url[index]" class="item" v-for="(item,index) in data" :key="item.id">
            <div class="item-pic">
                <img width="40" height="40" :src="item.img">
            </div>
            <div class="item-text">{{item.brand}}回收</div>
        </router-link>
    </div>
</template>

<script>
export default {
    data() {
        return {}
    },
    props: {
        data: {     //默认的循环数据
            type: Array,
            default: [],
        },
        url: {
            type: Array,
            default: function(){
                var arr = []
                var arr = [
                    '/hschoice?id=1',
                    '/hschoice?id=2',
                    '/hschoice?id=3',
                    '/hschoice?id=4',
                ]
                return arr
                
                
            }
        }
    }
}
</script>
<style  lang="less" scoped>

    .nine-wrapper{
        display:flex;
        flex-wrap: wrap;
        .item{
            flex:0 0 25%;
            text-align:center;
            padding:10px 0;
            .item-pic{
                width:40px;
                height:40px;
                margin:0 auto;
                line-height:40px;
                border-radius:15px;
                margin-bottom:10px;
            }
            .item-text{
                font-size:10px;
                color:#454545;
            }
        }
    }
</style>
